from functools import lru_cache
from pydantic import ConfigDict
from pydantic_settings import BaseSettings

class Settings(BaseSettings):
    log_levels: str # 所有模块日志级别配置
    
    model_config = ConfigDict(env_file=".env")

@lru_cache
def get_settings():
    """获取环境变量配置"""
    return Settings()